package com.iwdnb.gkgz.common.enums;

import com.iwdnb.bmnf.common.enums.CodeMessage;

/**
 * 行业板块枚举
 *
 * @see com.iwdnb.gkgz.infrastructure.dao.client.impl.MairuiClientImpl#initIndustryList()
 */
public enum StockIndustryEnums implements CodeMessage {
    sw_mt("sw_mt", "煤炭"),
    sw_sysh("sw_sysh", "石油石化"),
    sw_mrhl("sw_mrhl", "美容护理"),
    sw_hb("sw_hb", "环保"),
    sw_dlsb("sw_dlsb", "电力设备"),
    sw_shfw("sw_shfw", "社会服务"),
    sw_smls("sw_smls", "商贸零售"),
    sw_fzfs("sw_fzfs", "纺织服饰"),
    sw_jchg("sw_jchg", "基础化工"),
    sw_tx("sw_tx", "通信"),
    sw_cm("sw_cm", "传媒"),
    sw_jsj("sw_jsj", "计算机"),
    sw_gfjg("sw_gfjg", "国防军工"),
    sw_jxsb("sw_jxsb", "机械设备"),
    sw_jzzs("sw_jzzs", "建筑装饰"),
    sw_jzcl("sw_jzcl", "建筑材料"),
    sw_fyjr("sw_fyjr", "非银金融"),
    sw_yx("sw_yx", "银行"),
    sw_fdc("sw_fdc", "房地产"),
    sw_jtys("sw_jtys", "交通运输"),
    sw_gysy("sw_gysy", "公用事业"),
    sw_yysw("sw_yysw", "医药生物"),
    sw_qgzz("sw_qgzz", "轻工制造"),
    sw_spyl("sw_spyl", "食品饮料"),
    sw_jydq("sw_jydq", "家用电器"),
    sw_qc("sw_qc", "汽车"),
    sw_dz("sw_dz", "电子"),
    sw_ysjs("sw_ysjs", "有色金属"),
    sw_gt("sw_gt", "钢铁"),
    sw_nlmy("sw_nlmy", "农林牧渔"),
    sw_zh("sw_zh", "综合"),
    ;

    private String code;
    private String message;

    StockIndustryEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public static StockIndustryEnums getEnumByCodeOrName(String v) {
        for (StockIndustryEnums bk : StockIndustryEnums.values()) {
            if (bk.getCode().equals(v) || bk.getMessage().equals(v)) {
                return bk;
            }
        }
        return null;
    }
}
